home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-06-26 | 2.2 KB | 56 lines | [TEXT/GEOL] |
- Item 5451507 21-June-89 16:36
-
- From: D2086 Efficient Field Svc, C Faith, PRT
-
- To: MACAPP.TECH$ MACAPP Tech
- ROSENSTEIN1 Rosenstein, Larry
-
- Sub: obj. Pascal again
-
- Larry,
-
- Thanks for the reply.
-
- As far as needing to know whether a routine is called via inherited or not,
- here is my reasoning for what I am trying to accomplish.
-
- I wish to have my abstract class perform as much of the actions as are
- necessary, but also warn if all the methods that should have been overridden
- are not. Under the scheme you suggested the abstract method is not allowed to
- do anything, so all utility must be included in the method of the descendant
- subclass.
-
- Using TAbstract again:
-
- I cannot have the method DoSomething do anything in TAbstract and still warn
- that it should be overriden. (Maybe this is not desirable?)
-
- Say I have an abstract class that is a database handler. I want methods of
- that object that do things with the database. Some of these things are general
- and will be the same for all subclasses of the database handler. Some will
- need to be implemented according to the individual needs of the subclass, a
- different set of things for a subclass that uses InsideOut than one that used
- internal database management routines.
-
- I want the abstract class's methods to be able to implement the generic things
- via INHERITED and yet still warn the programmer If the call is not the result
- of an INHERITED statement, i.e. it was not OVERRIDDEN. The specific object
- TInsideOut for instance can use the inherited general items and add its own
- more specific ones and no warnings would be issued. But at the same time the
- programmer is given warnings if he does not implement all the methods that need
- to be implemented to make a truly functional subclass.
-
- Regarding method optimization, I was under the impression that calls to
- routines in other segments use jump table addressing and calls to routines in
- the same segment use direct JSR's. If a method called a method in another
- segment does the method use jump table addressing to locate the method table
- for that method? Or does it do something entirely different?
-
- hope this makes sense,
-
- Curtis Faith
-
-
-
-
-